package com.eastmoney.emis.edda.domain.valueobject;

/**
 * @description: 0待处理 1银行处理中 2银行处理成功 3银行处理失败 4资金存成功 5资金存失败 6作废
 * @projectName: EDDA-HSBC
 * @package: com.eastmoney.emis.edda.domain.valueobject
 * @author: 汪程程
 * @date: 2022/10/13 10:15 AM
 * @version: 1.0
 */
public enum EddiStatus {

    INIT("0"),

    BANK_PROCESS("1"),

    BANK_PROCESS_SUCCESS("2"),

    BANK_PROCESS_FAIL("3"),

    FUND_DEPOSIT_SUCCESS("4"),

    FUND_DEPOSIT_FAIL("5"),

    INVALID("6");

    private String value;

    EddiStatus(String value) {
        this.value = value;
    }

    public String value() {
        return value;
    }

    private static final EddiStatus[] EDDI_STATUS = EddiStatus.values();
    public static EddiStatus parse(String value) {
        for (EddiStatus eddiStatus : EDDI_STATUS) {
            if(eddiStatus.value.equals(value)) {
                return eddiStatus;
            }
        }
        return EddiStatus.INVALID;
    }


}
